SQ_EDGE_SCREEN
Overview
Calculate the loss coefficient for a square edged wire screen, bar screen, or perforated plate.
Excel Usage
=SQ_EDGE_SCREEN(alpha)
alpha(float, required): Fraction of screen open to flow, [-]
Returns (float): Loss coefficient K, [-], or error message (str) if input is invalid.
Examples
Example 1: High open area (alpha=0.99)
Inputs:
| alpha |
|---|
| 0.99 |
Excel formula:
=SQ_EDGE_SCREEN(0.99)
Expected output:
| Result |
|---|
| 0.008 |
Example 2: Medium open area (alpha=0.5)
Inputs:
| alpha |
|---|
| 0.5 |
Excel formula:
=SQ_EDGE_SCREEN(0.5)
Expected output:
| Result |
|---|
| 3.8 |
Example 3: Low open area (alpha=0.2)
Inputs:
| alpha |
|---|
| 0.2 |
Excel formula:
=SQ_EDGE_SCREEN(0.2)
Expected output:
| Result |
|---|
| 52 |
Example 4: Typical screen (alpha=0.7)
Inputs:
| alpha |
|---|
| 0.7 |
Excel formula:
=SQ_EDGE_SCREEN(0.7)
Expected output:
| Result |
|---|
| 1.1 |
Python Code
import micropip
await micropip.install(["fluids"])
from fluids.filters import square_edge_screen as fluids_square_edge_screen
def sq_edge_screen(alpha):
"""
Calculate the loss coefficient for a square edged wire screen, bar screen, or perforated plate.
See: https://fluids.readthedocs.io/fluids.filters.html#fluids.filters.square_edge_screen
This example function is provided as-is without any representation of accuracy.
Args:
alpha (float): Fraction of screen open to flow, [-]
Returns:
float: Loss coefficient K, [-], or error message (str) if input is invalid.
"""
# Validate and convert alpha
try:
alpha = float(alpha)
except (ValueError, TypeError):
return "Error: Alpha must be a number."
# Validate alpha range
if alpha <= 0 or alpha > 1:
return "Error: Alpha must be between 0 and 1."
try:
result = fluids_square_edge_screen(alpha=alpha)
# Handle NaN and infinity
if result != result: # NaN check
return "nan"
if result == float('inf'):
return "inf"
if result == float('-inf'):
return "-inf"
return float(result)
except Exception as e:
return f"Error computing square_edge_screen: {str(e)}"